﻿@model ShivamEMR.Model.Domain.DoctorsDomain.Doctor

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
 
<link href="@Url.Content("~/Content/uploadImage/uploadify.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Content/uploadImage/jquery.uploadify-3.1.min.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(window).load(
    function () {
        $("#ImageContainer").uploadify({
            'swf': '@Url.Content("~/Content/uploadImage/uploadify.swf")',
            'uploader': '/Patient/patient/Upload',
            'onUploadSuccess': function (file, data, response) {
                $("#UploadedImage").hide("fast").attr("src", "/Uploads/" + file.name).show("slow");
                $("#Picture").attr("value", file.name);
            },
            'onUploadError': function (file, errorCode, errorMsg, errorString) {
                alert('The file ' + file.name + ' could not be uploaded: ' + errorString);
            }
        });


    }
);
</script>

 <script type="text/javascript">
     $(document).ready(function () {
         $("#tabs").tabs();
     });    
	</script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
<div id="tabs">
	    <ul>
		    <li><a href="#tabs-1">Basic </a></li>
		    <li><a href="#tabs-2">Clinic</a></li>
		    <li><a href="#tabs-3">Contact</a></li>
               <li><a href="#tabs-4">Address</a></li>
		    <li><a href="#tabs-5">Medical</a></li>
		 
	    </ul>
	    <div id="tabs-1">
       
        <table width="100%" cellpadding="4" cellspacing="4">
	  
      	<tr>
	<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Code)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.Code)
            @Html.ValidationMessageFor(model => model.Code)
        </div>
</td>
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>
</td>
    </tr>
      
      
       <tr>
   <td>

        <div class="editor-label">
            @Html.LabelFor(model => model.FirstName)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.FirstName)
            @Html.ValidationMessageFor(model => model.FirstName)
        </div>
</td>
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.MiddleName)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.MiddleName)
            @Html.ValidationMessageFor(model => model.MiddleName)
        </div>
</td>
    </tr><tr>
	<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.LastName)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.LastName)
            @Html.ValidationMessageFor(model => model.LastName)
        </div>
</td>
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.AltFirstName)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.AltFirstName)
            @Html.ValidationMessageFor(model => model.AltFirstName)
        </div>
</td>
    </tr><tr>
	<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.AltMiddleName)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.AltMiddleName)
            @Html.ValidationMessageFor(model => model.AltMiddleName)
        </div>
</td>
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.AltLastName)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.AltLastName)
            @Html.ValidationMessageFor(model => model.AltLastName)
        </div>
</td>
    </tr><tr>
	<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.DateOfBirth)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.DateOfBirth)
            @Html.ValidationMessageFor(model => model.DateOfBirth)
        </div>
</td>
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Barcode)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.Barcode)
            @Html.ValidationMessageFor(model => model.Barcode)
        </div>
</td>
    </tr><tr>
	<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Sex)
        </div>
</td>
<td>

       <div class="editor-field">
    @Html.DropDownListFor(model => model.SexID, ((IEnumerable<ShivamEMR.Model.Domain.PersonDomain.Sex>)ViewBag.PossibleSexes).Select(option => new SelectListItem 
{
        Text = Html.DisplayTextFor(_ => option.SexName).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.SexID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.SexID)
</div>
</td>
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.MaritalStatus)
        </div>
</td>
<td>

       <div class="editor-field">
    @Html.DropDownListFor(model => model.MaritalSatusID, ((IEnumerable<ShivamEMR.Model.Domain.PersonDomain.MaritalStatus>)ViewBag.PossibleMaritalStatus).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option.Status).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.MaritalSatusID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.MaritalSatusID)
</div>
</td>
    </tr>
    
    <tr>
	<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.PersonStatus)
        </div>
</td>
<td>

        <div class="editor-field">
    @Html.DropDownListFor(model => model.PersonStatusID, ((IEnumerable<ShivamEMR.Model.Domain.PersonDomain.PersonStatus>)ViewBag.PossiblePersonStatus).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option.Status).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.PersonStatusID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.PersonStatusID)
</div>
</td>
    </tr>

    <tr>
	     </tr></table></div>
     <div id="tabs-2">
       
        <table width="100%" cellpadding="4" cellspacing="4">

        <tr>
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.DrCode)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.DrCode)
            @Html.ValidationMessageFor(model => model.DrCode)
        </div>
</td>
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.DrNotes)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.DrNotes)
            @Html.ValidationMessageFor(model => model.DrNotes)
        </div>
</td>
    </tr><tr>
	<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.EmpCode)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.EmpCode)
            @Html.ValidationMessageFor(model => model.EmpCode)
        </div>
</td>
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.DateOfJoin)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.DateOfJoin)
            @Html.ValidationMessageFor(model => model.DateOfJoin)
        </div>
</td>
    </tr><tr>
	<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.EmpNotes)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.EmpNotes)
            @Html.ValidationMessageFor(model => model.EmpNotes)
        </div>
</td>
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.EmployeeStatus)
        </div>
</td>
<td>

      <div class="editor-field">
    @Html.DropDownListFor(model => model.EmployeeStatusID, ((IEnumerable<ShivamEMR.Model.Domain.CompanyDomain.EmployeeStatus>)ViewBag.PossibleEmployeeStatus).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option.Status).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.EmployeeStatusID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.EmployeeStatusID)
</div>
</td>
    </tr>
    <tr>
	<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Group)
        </div>
</td>
<td>

       <div class="editor-field">
    @Html.DropDownListFor(model => model.EmployeeGroupID, ((IEnumerable<ShivamEMR.Model.Domain.CompanyDomain.EmployeeGroup>)ViewBag.PossibleEmployeeGroups).Select(option => new SelectListItem
{
        Text = Html.DisplayTextFor(_ => option.Group).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.EmployeeGroupID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.EmployeeGroupID)
</div>


</td>
    </tr><tr>
    <td>
               <div class="editor-label">
                    Specialties
                </div></td>
                <td>
                <div class="editor-field">
                    @Html.DropDownListFor(model => model.Specialties, ((IEnumerable<ShivamEMR.Model.Domain.DoctorsDomain.Specialty>)ViewBag.Specialties).Select(option => new SelectListItem
                {
                    Text = Html.DisplayTextFor(_ => option.Title).ToString(),
                    Value = option.ID.ToString()/*,
                    Selected = (Model != null) && (option.ID == Model.Specialties)*/
                }),new {@multiple="multiple"})
                    @Html.ValidationMessageFor(model => model.ID)
                </div></td>

    </tr>
	   @*<tr>
   <td>

        <div class="editor-label">
            @Html.LabelFor(model => model.PictureID)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.PictureID)
            @Html.ValidationMessageFor(model => model.PictureID)
        </div>
</td>
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.PersonAccountID)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.PersonAccountID)
            @Html.ValidationMessageFor(model => model.PersonAccountID)
        </div>
</td>
    </tr>*@
    
    <tr>
	     </tr></table></div>   
           
   </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
<script>
$(function () {
    $("div.metro-pivot").metroPivot();
});
</script>
